Skip to content

Perf: Optimize member handling in collectives with a large number of members#2518

Open
Koc wants to merge 2 commits into
mainfrom
feature/optimize-members-list-2
Open

Perf: Optimize member handling in collectives with a large number of members#2518
Koc wants to merge 2 commits into
mainfrom
feature/optimize-members-list-2

Conversation

@Koc
Copy link
Copy Markdown
Contributor

@Koc Koc commented May 17, 2026

📝 Summary

This is continuation of #2443.

I've generated 1200 users using ./occ user:add and assigned them to a single collective using ./occ circles:members:add. Here are my findings:

1. Members list endpoint works really slow

I had an attempt to implement lightweight API endpoint in circles module but stuck with it due to federated users. This is a really loong path which I'd prefer to avoid. Also keep in mind that we're reloading this members list every 1 minute due to background fetcher and endpoint latency goes up to 10s in our organization.

So, instead of that we're loading only 15 users for a landing page. And then re-loading all users once we toggle editor mode from preview to edit. This improves performance of BE without degradation of the users autocomplete functionality in the editor.

Feel the difference 😃
image

2. vDOMException: The quota has been exceeded

This happens because we store circlesMembers in the local storage. I've changed it to a local variable. As an option - we can store same 15 users but this would add even more complexity.

At the same time we're still store tons of keys like nextcloud_per_bmV4dGNsb3Vk_user-has-avatar.admin but this is a separate topic, let's handle it in the follow-up PRs.

image

3. There is no skeleton loading in the member picker popup

We have bad UX as endpoint can respond up to 10s in our case. I've added it

image

4. Full list reloading for an every member change

Every member change like add/remove/change level causes full list reloading. As we already mentioned - this is slow operation. When we managing large circle it becomes a nightmare. So I've added in-place update to state instead of full re-fetching.

Adding of new member looks a bit ugly, maybe we can improve that in the follow-up PRs by adding extra parameter to refetch a single user

🏁 Checklist

  • Code is properly formatted (npm run lint / npm run stylelint / composer run cs:check)
  • Sign-off message is added to all commits
  • Tests (unit, integration and/or end-to-end) passing and the changes are covered with tests
  • Documentation (README or documentation) has been updated or is not required

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI tools
  • The AI-generated content was reviewed, comprehended and tested by a human

Comment thread src/components/Page/TextEditor.vue Outdated
Comment thread src/stores/circles.js Outdated
@Koc Koc force-pushed the feature/optimize-members-list-2 branch from 9fd8790 to 0f02d43 Compare May 30, 2026 16:04
@Koc
Copy link
Copy Markdown
Contributor Author

Koc commented May 30, 2026

@mejo- heh, it seems like that topic is much more complex. I've updated the PR description and pushed more changes. Please, re-review

@Koc Koc changed the title Perf: Optimize member list on the landing page for collective with large number of members Perf: Optimize member handling in collectives with a large number of members May 30, 2026
…rge number of members

Signed-off-by: Kostiantyn Miakshyn <molodchick@gmail.com>
@Koc Koc force-pushed the feature/optimize-members-list-2 branch from 0f02d43 to 0cc7584 Compare May 30, 2026 22:16
…rge number of members (in-place updates)

Signed-off-by: Kostiantyn Miakshyn <molodchick@gmail.com>
@Koc Koc force-pushed the feature/optimize-members-list-2 branch from 0cc7584 to 66c9f24 Compare May 30, 2026 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants